/*
 * buzzer.h
 *
 *  Created on: 2012-09-07
 *      Author: wojciech
 */

#ifndef BUZZER_H_
#define BUZZER_H_

#ifdef __cplusplus
extern "C" {
#endif

/*BUZZER*/
#define BUZZER_PORT 				LPC_GPIO1->PIN
#define BUZZER_DIR 					LPC_GPIO1->DIR
#define BUZZER							2
#define BUZZER_ON						BUZZER_PORT &= ~BIT(BUZZER)
#define BUZZER_OFF				 	BUZZER_PORT |= BIT(BUZZER)
#define BUZZER_NO_BEEP			0
#define BUZZER_BEEP_SHORT		3
#define BUZZER_BEEP_MEDIUM	100
#define BUZZER_BEEP_LONG		300
#define BUZZER_BEEP_DOUBLE	(1 << 30)
#define BUZZER_BEEP_TRIPLE	(2 << 30)

void vBUZZER_Init( void );
void vBUZZER_Beep( uint32_t duration );

#ifdef __cplusplus
}
#endif

#endif /* BUZZER_H_ */
